package com.chinasofti.test;

import com.sun.javafx.image.impl.IntArgb;

import java.util.Arrays;

public class demo06 {
    public static void main(String[] args) {
//        int[] arr = {3,2,7,4,6};
//        //返回指定数组内容的字符串表现形式
//        System.out.println(Arrays.toString(arr));

//        int[] arr1 = {3,2,7,4,6};
//        Arrays.sort(arr1);
        //快速排序
//        System.out.println(Arrays.toString(arr1));
        //二分法查找指定元素索引
        int[] arr1 = {1,3,4,5,2,6,8,9};
        int index = Arrays.binarySearch(arr1,8);
        System.out.println(index);


    }
}
